import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/ruoyi";

// 查询供应商资料列表
export function listSupplier(query) {
    return request({
        url: '/wms/supplier/list',
        method: 'get',
        params: query
    })
}

// 查询供应商资料详细
export function getSupplier(supplierId) {
    return request({
        url: '/wms/supplier/' + parseStrEmpty(supplierId),
        method: 'get'
    })
}

// 新增供应商资料
export function addSupplier(data) {
    return request({
        url: '/wms/supplier',
        method: 'post',
        data: data
    })
}

// 修改供应商资料
export function updateSupplier(data) {
    return request({
        url: '/wms/supplier',
        method: 'put',
        data: data
    })
}

// 删除供应商资料
export function delSupplier(supplierId) {
    return request({
        url: '/wms/supplier/' + supplierId,
        method: 'delete'
    })
}
